<template>
  <div class="GreetingCardPage">
    <infoText ref="infoText"></infoText>
    <HomePage v-if="pageName === 'HomePage'" demo="2"></HomePage>
    <MinePage v-if="pageName === 'MinePage'"></MinePage>
    <TabBar ref="tabBar"></TabBar>
  </div>
</template>

<script>
import HomePage from './home.vue'
import MinePage from './mine.vue'
import TabBar from './tabBar.vue'

export default {
  components: {
    HomePage,
    MinePage,
    TabBar,
  },
  data() {
    return {
      pageName: 'HomePage',
    }
  },
  created() {
    document.title = '苏州相城社保卡发放'
  },
  mounted() {
    window.localStorage.companyId = '1'
  },
  methods: {
    pageSwich(i) {
      if (i == 0) {
        this.pageName = 'HomePage'
      } else if (i == 2) {
        this.pageName = 'MinePage'
      }
    },
    pageSwichBtn(i) {
      this.$refs.tabBar.tabBtn(i)
    },
  },
}
</script>

<style scoped>
.GreetingCardPage {
  background: #f7f9fb;
  min-height: 100vh;
}
.pageLoad {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 600;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.pageLoad1 {
  color: #000;
  font-size: 34rpx;
  background: #fff;
  border-radius: 16px;
  width: 520rpx;
  margin: 0 auto;
  padding: 60rpx 30rpx;
}
</style>
